package com.kcnet.qk.Common;


import java.util.ArrayList;
import java.util.List;

import com.kcnet.qk.R;
import com.kcnet.qk.app.AppContext;
import com.kcnet.qk.constant.Const;
import com.kcnet.qk.model.FuncItem;
import com.kcnet.qk.util.AppUtil;
import com.kcnet.qk.util.PreferenceHelper;

/**
 * Created by czc on 2017/7/7.
 */

public class FuncItemFactory {

    private static FuncItemFactory instance;


    public static final String TAB_ADD_FIREND_MOD = "添加好友";
    public static final String TAB_HDYH = "互动养号";
    public static final String TAB_TIMELINE = "发布动态";
    public static final String TAB_TEAM_AND_HOME = "小组与主页";
    //public static final String TAB_REQ_MANGER = "任务管理";

    public static final String ADD_FIREND_PHONE = "添加通讯录好友";
    public static final String ADD_FIREND_FRIED = "添加好友的好友";
    public static final String ADD_FIREND_RECOMMED = "添加推荐好友";
    public static final String ADD_FIREND_ADOPT = "通过好友请求";
  //  public static final String ADD_FIREND_HOME = "添加主页好友";
    public static final String ADD_FRIEND_SEATCH_NAME = "根据名称搜索好友";
    public static final String ADD_FRIEND_SEATCH_EMAIL = "根据邮箱搜索好友";

    public static final String HDYH_TIME_LINE_ZANS = "时间线点赞";
    public static final String HDYH_TIME_LINE_FRIENDS_ZANS = "好友时间线点赞";
    public static final String HDYH_YH = "养号";

    public static final String TIMELINE_SEND_TEXT = "发布文字动态";
    public static final String TIMELINE_SEND_IMG = "发布图片动态";
    public static final String TIMELINE_SEND_IMG_TEXT = "发布图文动态";
    public static final String TIMELINE_SEND_HOME = "发送主页";
    public static final String TIMELINE_SEND_HOME_TIME = "发送主页到好友时间线";
    public static final String TIMELINE_SEND_ALL_MSG = "好友群发消息";

    public static final String TEAM_TEAM_MAG = "小组管理";
    public static final String TEAM_ATTS_TEAM = "关注主页";
    public static final String TEAM_RQ_FRIEND_TEAM = "邀请好友进组";
    public static final String TEAM_RQ_FRIEND_ZANS = "邀请好友点赞";

    public static final String STOP_ADD_PEOPLE = "停止所有操作";
    public static final String FLOW_WINDOW = "显示悬浮窗";

    public static final String SOCKET_CON_SERVER = "连接服务器";
    public static final String SOCKET_CON_SERVER_STATUS = "检测连接服务器状态";
    public static final String APP_CHECK_UPDATE = "检测APP更新";
    private FuncItemFactory() {

    }

    public static FuncItemFactory getInstance() {
        synchronized (FuncItemFactory.class) {
            if (instance == null) {
                instance = new FuncItemFactory();
            }
        }
        return instance;
    }

    public List<FuncItem> createmMainFuncItems() {
        List<FuncItem> list = new ArrayList<FuncItem>() {
            {
                //add(new FuncItem(TAB_ADD_FIREND_MOD, TAB_ADD_FIREND_MOD, R.drawable.icon_auto, false));
               // add(new FuncItem(TAB_HDYH, TAB_HDYH, R.drawable.icon_auto, false));
               // add(new FuncItem(TAB_TIMELINE, TAB_TIMELINE, R.drawable.icon_auto, false));
                //add(new FuncItem(TAB_TEAM_AND_HOME, TAB_TEAM_AND_HOME, R.drawable.icon_auto, false));
               // add(new FuncItem(TAB_REQ_MANGER, TAB_REQ_MANGER, R.drawable.icon_auto, false));
                add(new FuncItem(SOCKET_CON_SERVER_STATUS, SOCKET_CON_SERVER_STATUS, R.drawable.icon_flow_window, false));
                add(new FuncItem(SOCKET_CON_SERVER, SOCKET_CON_SERVER, R.drawable.icon_flow_window, false));

                add(new FuncItem(APP_CHECK_UPDATE, "当前版本:"+AppUtil.getVersionName(AppContext.getInstance().getContext()), R.drawable.icon_flow_window, false));
                add(new FuncItem(STOP_ADD_PEOPLE, STOP_ADD_PEOPLE, R.drawable.icon_stop, false));
                add(new FuncItem(FLOW_WINDOW, FLOW_WINDOW, R.drawable.icon_flow_window, false));

            }
        };

        return list;
    }

    public List<FuncItem> createmAddFriendFuncItems() {
        List<FuncItem> list = new ArrayList<FuncItem>() {
            {
                add(new FuncItem(ADD_FIREND_PHONE, ADD_FIREND_PHONE, R.drawable.icon_auto, false));
                add(new FuncItem(ADD_FIREND_FRIED, ADD_FIREND_FRIED, R.drawable.icon_auto, false));
                add(new FuncItem(ADD_FIREND_RECOMMED, ADD_FIREND_RECOMMED, R.drawable.icon_auto, false));
                add(new FuncItem(ADD_FIREND_ADOPT, ADD_FIREND_ADOPT, R.drawable.icon_auto, false));
               // add(new FuncItem(ADD_FIREND_HOME, ADD_FIREND_HOME, R.drawable.icon_auto, false));
                add(new FuncItem(ADD_FRIEND_SEATCH_NAME, ADD_FRIEND_SEATCH_NAME, R.drawable.icon_auto, false));
                add(new FuncItem(ADD_FRIEND_SEATCH_EMAIL, ADD_FRIEND_SEATCH_EMAIL, R.drawable.icon_auto, false));

            }
        };

        return list;
    }

    public List<FuncItem> createmHDYHFuncItems() {
        List<FuncItem> list = new ArrayList<FuncItem>() {
            {
                add(new FuncItem(HDYH_TIME_LINE_ZANS, HDYH_TIME_LINE_ZANS, R.drawable.icon_auto, false));
                add(new FuncItem(HDYH_TIME_LINE_FRIENDS_ZANS, HDYH_TIME_LINE_FRIENDS_ZANS, R.drawable.icon_auto, false));
                add(new FuncItem(HDYH_YH, HDYH_YH, R.drawable.icon_auto, false));

            }
        };

        return list;
    }


    public List<FuncItem> createmTimeLineFuncItems() {
        List<FuncItem> list = new ArrayList<FuncItem>() {
            {

                add(new FuncItem(TIMELINE_SEND_TEXT, TIMELINE_SEND_TEXT, R.drawable.icon_auto, false));
                add(new FuncItem(TIMELINE_SEND_IMG, TIMELINE_SEND_IMG, R.drawable.icon_auto, false));
                add(new FuncItem(TIMELINE_SEND_IMG_TEXT, TIMELINE_SEND_IMG_TEXT, R.drawable.icon_auto, false));
                add(new FuncItem(TIMELINE_SEND_HOME, TIMELINE_SEND_HOME, R.drawable.icon_auto, false));
                add(new FuncItem(TIMELINE_SEND_HOME_TIME, TIMELINE_SEND_HOME_TIME, R.drawable.icon_auto, false));
                add(new FuncItem(TIMELINE_SEND_ALL_MSG, TIMELINE_SEND_ALL_MSG, R.drawable.icon_auto, false));

            }
        };

        return list;
    }

    public List<FuncItem> createmTeamAndHomeFuncItems() {
        List<FuncItem> list = new ArrayList<FuncItem>() {
            {

                add(new FuncItem(TEAM_TEAM_MAG, TEAM_TEAM_MAG, R.drawable.icon_auto, false));
                add(new FuncItem(TEAM_ATTS_TEAM, TEAM_ATTS_TEAM, R.drawable.icon_auto, false));
                add(new FuncItem(TEAM_RQ_FRIEND_TEAM, TEAM_RQ_FRIEND_TEAM, R.drawable.icon_auto, false));
                add(new FuncItem(TEAM_RQ_FRIEND_ZANS, TEAM_RQ_FRIEND_ZANS, R.drawable.icon_auto, false));

            }
        };

        return list;
    }
}
